

String.prototype.camelcase = function(arg) {
    var offset = arg || 0;
    var nodes = this.replace("-", " ").split(" ");
    for (var i=0; i<nodes.length; i++) {
        if (i >= offset)
            nodes[i] = nodes[i].replace( /(^|\s)([a-z])/g , function(m,p1,p2) {
                return p1+p2.toUpperCase();
            } );
    };
    return nodes.join("");
};

Array.prototype.exists = function(o) {
    for (var i = 0; i < this.length; i++) {
        if (this[i] === o)
            return true;
    }
    return false;
};
